<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="sec" uri="http://www.springframework.org/security/tags" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<sec:authentication property="principal" var="currentPrincipal" scope="page"/>

<fmt:setBundle basename="ApplicationMessage"/>
<fmt:setLocale value="zh_CN"/>

<!DOCTYPE html>
<html lang="zh-CN">
<head>

  <%@ include file="/WEB-INF/include/meta.jsp" %>
  <%@ include file="/WEB-INF/include/css.jsp" %>

</head>

<body class="x-theme-draft">

  <%@ include file="/WEB-INF/include/header.jsp" %>
  <%@ include file="/WEB-INF/include/submenu.jsp" %>
  
  <div class="container-fluid x-container has-x-sidemenu">
  
    <ol class="x-breadcrumb breadcrumb">
      <li class="active">个人中心 &nbsp;&nbsp;-&nbsp;&nbsp;基本信息</li>
    </ol>
  
    <div class="x-content-layout">
  
      <div class="form-horizontal x-form form-personal-info">
      
        <div class="block-heading">
          <h5>基本信息</h5>
          <div class="pull-right" style="margin-top: 10px">
  	        <a href="${ctx.host}/profile/${id}/change-password" data-target="#change-password" data-toggle="modal">修改密码</a>&nbsp;
          </div>
        </div>
  
        <div class="form-horizontal x-form form-personal-info">
  
          <div class="form-group x-form-group">
            <label class="control-label col-xs-2" style="width: 12%;">姓名：</label>
            <div class="col-xs-2">
              <p class="form-control-static">${profile.name}</p>
            </div>
  
            <label class="control-label col-xs-2" style="width: 12%;">角色：</label>
            <div class="col-xs-2">
              <p class="form-control-static">
              ${secure.roles[profile.authority].description}
              </p>
            </div>
          </div>
  
          <div class="form-group x-form-group">
            <label class="control-label col-xs-2" style="width: 12%;">电话号码：</label>
            <div class="col-xs-2">
              <p class="form-control-static">${profile.mobile}</p>
            </div>
          </div>
  
        </div>
      </div>
    </div>
  </div>

	<%@ include file="/WEB-INF/include/script.jsp" %>
    <d:resource root="${ctx.resource}/build" type="script" src="js/page/authority/profile.js" />
    <script type="text/javascript">
            require([ 'page/authority/profile' ], function(page) {
                page.init();
            })
        </script>
</body>
</html>